/*
 * Pipe.scala
 */

package acorn.jash.io

import acorn.jash.{Input,Output,Path}

import java.util.Queue
import java.util.concurrent.LinkedBlockingQueue

class Pipe extends Input with Output {

  override def get():String = {
    qu take
  }

  override def put(arg:String) {qu put arg}

  override def putln(arg:String) {qu put (arg + Path.lineSeparator)}

  var msg:String = ""

  val qu = new LinkedBlockingQueue[String]
}
